﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace AutoHistory.Core
{
    public class HistoryFile
    {
        public string SourceFile { get; set; }
        public string File { get; set; }
        public long Timestamp { get; set; }

        public HistoryFile(string sourceFile, string historyFile)
        {
            this.SourceFile = sourceFile;
            this.File = historyFile;
            this.Timestamp = long.Parse(Path.GetExtension(historyFile).TrimStart('.'));
        }

        public DateTime Date
        {
            get
            {
                return DateTime.FromBinary(this.Timestamp);
            }
        }
    }
}
